package com.asambleacristiana.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the asistencia database table.
 * 
 */

@Embeddable
public class ImagenPK implements Serializable {
	// default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name = "ID_HIMNO", insertable = false, updatable = false)
	private Integer idHimno;

	@Column(name = "ID_IMAGEN", insertable = false, updatable = false)
	private Integer idImagen;

	public ImagenPK() {
	}

	public Integer getIdHimno() {
		return idHimno;
	}

	public void setIdHimno(Integer idHimno) {
		this.idHimno = idHimno;
	}

	public Integer getIdImagen() {
		return idImagen;
	}

	public void setIdImagen(Integer idImagen) {
		this.idImagen = idImagen;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((idHimno == null) ? 0 : idHimno.hashCode());
		result = prime * result
				+ ((idImagen == null) ? 0 : idImagen.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ImagenPK other = (ImagenPK) obj;
		if (idHimno == null) {
			if (other.idHimno != null)
				return false;
		} else if (!idHimno.equals(other.idHimno))
			return false;
		if (idImagen == null) {
			if (other.idImagen != null)
				return false;
		} else if (!idImagen.equals(other.idImagen))
			return false;
		return true;
	}



}